Path 1: 37 calls (0.97)

'ZeroDivisionError' (14) ZeroDivisionError (14) 'ValueError' (2) ValueError (2) 'RuntimeError' (1) RuntimeError (1) 'SyntaxError' (1) SyntaxError (1) ...

'ZeroDivisionError' (14) 'division by zero' (14) 'ValueError' (2) 'RuntimeError' (1) '' (1) 'SyntaxError' (1) "'(' was never closed (, line 1)...

1def safe_str(_object: Any) -> str:
2            """Don't allow exceptions from __str__ to propagate."""
3            try:
4                return str(_object)
5            except Exception:
6                return "<exception str() failed>"
            

Path 2: 1 calls (0.03)

test_broken_str..BrokenStr (1)

'' (1)

ZeroDivisionError (1)

1def safe_str(_object: Any) -> str:
2            """Don't allow exceptions from __str__ to propagate."""
3            try:
4                return str(_object)
5            except Exception:
6                return "<exception str() failed>"